// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by sidekick. DO NOT EDIT.
use crate::Result;

/// Implements a [BusinessGlossaryService](super::stub::BusinessGlossaryService) decorator for logging and tracing.
#[derive(Clone, Debug)]
pub struct BusinessGlossaryService<T>
where
    T: super::stub::BusinessGlossaryService + std::fmt::Debug + Send + Sync,
{
    inner: T,
}

impl<T> BusinessGlossaryService<T>
where
    T: super::stub::BusinessGlossaryService + std::fmt::Debug + Send + Sync,
{
    pub fn new(inner: T) -> Self {
        Self { inner }
    }
}

impl<T> super::stub::BusinessGlossaryService for BusinessGlossaryService<T>
where
    T: super::stub::BusinessGlossaryService + std::fmt::Debug + Send + Sync,
{
    #[tracing::instrument(ret)]
    async fn create_glossary(
        &self,
        req: crate::model::CreateGlossaryRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.create_glossary(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn update_glossary(
        &self,
        req: crate::model::UpdateGlossaryRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.update_glossary(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_glossary(
        &self,
        req: crate::model::DeleteGlossaryRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.delete_glossary(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_glossary(
        &self,
        req: crate::model::GetGlossaryRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::Glossary>> {
        self.inner.get_glossary(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_glossaries(
        &self,
        req: crate::model::ListGlossariesRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListGlossariesResponse>> {
        self.inner.list_glossaries(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn create_glossary_category(
        &self,
        req: crate::model::CreateGlossaryCategoryRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::GlossaryCategory>> {
        self.inner.create_glossary_category(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn update_glossary_category(
        &self,
        req: crate::model::UpdateGlossaryCategoryRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::GlossaryCategory>> {
        self.inner.update_glossary_category(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_glossary_category(
        &self,
        req: crate::model::DeleteGlossaryCategoryRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        self.inner.delete_glossary_category(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_glossary_category(
        &self,
        req: crate::model::GetGlossaryCategoryRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::GlossaryCategory>> {
        self.inner.get_glossary_category(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_glossary_categories(
        &self,
        req: crate::model::ListGlossaryCategoriesRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListGlossaryCategoriesResponse>> {
        self.inner.list_glossary_categories(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn create_glossary_term(
        &self,
        req: crate::model::CreateGlossaryTermRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::GlossaryTerm>> {
        self.inner.create_glossary_term(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn update_glossary_term(
        &self,
        req: crate::model::UpdateGlossaryTermRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::GlossaryTerm>> {
        self.inner.update_glossary_term(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_glossary_term(
        &self,
        req: crate::model::DeleteGlossaryTermRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        self.inner.delete_glossary_term(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_glossary_term(
        &self,
        req: crate::model::GetGlossaryTermRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::GlossaryTerm>> {
        self.inner.get_glossary_term(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_glossary_terms(
        &self,
        req: crate::model::ListGlossaryTermsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListGlossaryTermsResponse>> {
        self.inner.list_glossary_terms(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_locations(
        &self,
        req: location::model::ListLocationsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<location::model::ListLocationsResponse>> {
        self.inner.list_locations(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_location(
        &self,
        req: location::model::GetLocationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<location::model::Location>> {
        self.inner.get_location(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn set_iam_policy(
        &self,
        req: iam_v1::model::SetIamPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::Policy>> {
        self.inner.set_iam_policy(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_iam_policy(
        &self,
        req: iam_v1::model::GetIamPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::Policy>> {
        self.inner.get_iam_policy(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn test_iam_permissions(
        &self,
        req: iam_v1::model::TestIamPermissionsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::TestIamPermissionsResponse>> {
        self.inner.test_iam_permissions(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_operations(
        &self,
        req: longrunning::model::ListOperationsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::ListOperationsResponse>> {
        self.inner.list_operations(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_operation(
        &self,
        req: longrunning::model::GetOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.get_operation(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_operation(
        &self,
        req: longrunning::model::DeleteOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        self.inner.delete_operation(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn cancel_operation(
        &self,
        req: longrunning::model::CancelOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        self.inner.cancel_operation(req, options).await
    }

    fn get_polling_error_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_error_policy::PollingErrorPolicy> {
        self.inner.get_polling_error_policy(options)
    }

    fn get_polling_backoff_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_backoff_policy::PollingBackoffPolicy> {
        self.inner.get_polling_backoff_policy(options)
    }
}

/// Implements a [CatalogService](super::stub::CatalogService) decorator for logging and tracing.
#[derive(Clone, Debug)]
pub struct CatalogService<T>
where
    T: super::stub::CatalogService + std::fmt::Debug + Send + Sync,
{
    inner: T,
}

impl<T> CatalogService<T>
where
    T: super::stub::CatalogService + std::fmt::Debug + Send + Sync,
{
    pub fn new(inner: T) -> Self {
        Self { inner }
    }
}

impl<T> super::stub::CatalogService for CatalogService<T>
where
    T: super::stub::CatalogService + std::fmt::Debug + Send + Sync,
{
    #[tracing::instrument(ret)]
    async fn create_entry_type(
        &self,
        req: crate::model::CreateEntryTypeRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.create_entry_type(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn update_entry_type(
        &self,
        req: crate::model::UpdateEntryTypeRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.update_entry_type(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_entry_type(
        &self,
        req: crate::model::DeleteEntryTypeRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.delete_entry_type(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_entry_types(
        &self,
        req: crate::model::ListEntryTypesRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListEntryTypesResponse>> {
        self.inner.list_entry_types(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_entry_type(
        &self,
        req: crate::model::GetEntryTypeRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::EntryType>> {
        self.inner.get_entry_type(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn create_aspect_type(
        &self,
        req: crate::model::CreateAspectTypeRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.create_aspect_type(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn update_aspect_type(
        &self,
        req: crate::model::UpdateAspectTypeRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.update_aspect_type(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_aspect_type(
        &self,
        req: crate::model::DeleteAspectTypeRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.delete_aspect_type(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_aspect_types(
        &self,
        req: crate::model::ListAspectTypesRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListAspectTypesResponse>> {
        self.inner.list_aspect_types(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_aspect_type(
        &self,
        req: crate::model::GetAspectTypeRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::AspectType>> {
        self.inner.get_aspect_type(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn create_entry_group(
        &self,
        req: crate::model::CreateEntryGroupRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.create_entry_group(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn update_entry_group(
        &self,
        req: crate::model::UpdateEntryGroupRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.update_entry_group(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_entry_group(
        &self,
        req: crate::model::DeleteEntryGroupRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.delete_entry_group(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_entry_groups(
        &self,
        req: crate::model::ListEntryGroupsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListEntryGroupsResponse>> {
        self.inner.list_entry_groups(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_entry_group(
        &self,
        req: crate::model::GetEntryGroupRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::EntryGroup>> {
        self.inner.get_entry_group(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn create_entry(
        &self,
        req: crate::model::CreateEntryRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::Entry>> {
        self.inner.create_entry(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn update_entry(
        &self,
        req: crate::model::UpdateEntryRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::Entry>> {
        self.inner.update_entry(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_entry(
        &self,
        req: crate::model::DeleteEntryRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::Entry>> {
        self.inner.delete_entry(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_entries(
        &self,
        req: crate::model::ListEntriesRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListEntriesResponse>> {
        self.inner.list_entries(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_entry(
        &self,
        req: crate::model::GetEntryRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::Entry>> {
        self.inner.get_entry(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn lookup_entry(
        &self,
        req: crate::model::LookupEntryRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::Entry>> {
        self.inner.lookup_entry(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn search_entries(
        &self,
        req: crate::model::SearchEntriesRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::SearchEntriesResponse>> {
        self.inner.search_entries(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn create_metadata_job(
        &self,
        req: crate::model::CreateMetadataJobRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.create_metadata_job(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_metadata_job(
        &self,
        req: crate::model::GetMetadataJobRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::MetadataJob>> {
        self.inner.get_metadata_job(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_metadata_jobs(
        &self,
        req: crate::model::ListMetadataJobsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListMetadataJobsResponse>> {
        self.inner.list_metadata_jobs(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn cancel_metadata_job(
        &self,
        req: crate::model::CancelMetadataJobRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        self.inner.cancel_metadata_job(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn create_entry_link(
        &self,
        req: crate::model::CreateEntryLinkRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::EntryLink>> {
        self.inner.create_entry_link(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_entry_link(
        &self,
        req: crate::model::DeleteEntryLinkRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::EntryLink>> {
        self.inner.delete_entry_link(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_entry_link(
        &self,
        req: crate::model::GetEntryLinkRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::EntryLink>> {
        self.inner.get_entry_link(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_locations(
        &self,
        req: location::model::ListLocationsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<location::model::ListLocationsResponse>> {
        self.inner.list_locations(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_location(
        &self,
        req: location::model::GetLocationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<location::model::Location>> {
        self.inner.get_location(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn set_iam_policy(
        &self,
        req: iam_v1::model::SetIamPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::Policy>> {
        self.inner.set_iam_policy(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_iam_policy(
        &self,
        req: iam_v1::model::GetIamPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::Policy>> {
        self.inner.get_iam_policy(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn test_iam_permissions(
        &self,
        req: iam_v1::model::TestIamPermissionsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::TestIamPermissionsResponse>> {
        self.inner.test_iam_permissions(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_operations(
        &self,
        req: longrunning::model::ListOperationsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::ListOperationsResponse>> {
        self.inner.list_operations(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_operation(
        &self,
        req: longrunning::model::GetOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.get_operation(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_operation(
        &self,
        req: longrunning::model::DeleteOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        self.inner.delete_operation(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn cancel_operation(
        &self,
        req: longrunning::model::CancelOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        self.inner.cancel_operation(req, options).await
    }

    fn get_polling_error_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_error_policy::PollingErrorPolicy> {
        self.inner.get_polling_error_policy(options)
    }

    fn get_polling_backoff_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_backoff_policy::PollingBackoffPolicy> {
        self.inner.get_polling_backoff_policy(options)
    }
}

/// Implements a [CmekService](super::stub::CmekService) decorator for logging and tracing.
#[derive(Clone, Debug)]
pub struct CmekService<T>
where
    T: super::stub::CmekService + std::fmt::Debug + Send + Sync,
{
    inner: T,
}

impl<T> CmekService<T>
where
    T: super::stub::CmekService + std::fmt::Debug + Send + Sync,
{
    pub fn new(inner: T) -> Self {
        Self { inner }
    }
}

impl<T> super::stub::CmekService for CmekService<T>
where
    T: super::stub::CmekService + std::fmt::Debug + Send + Sync,
{
    #[tracing::instrument(ret)]
    async fn create_encryption_config(
        &self,
        req: crate::model::CreateEncryptionConfigRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.create_encryption_config(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn update_encryption_config(
        &self,
        req: crate::model::UpdateEncryptionConfigRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.update_encryption_config(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_encryption_config(
        &self,
        req: crate::model::DeleteEncryptionConfigRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.delete_encryption_config(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_encryption_configs(
        &self,
        req: crate::model::ListEncryptionConfigsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListEncryptionConfigsResponse>> {
        self.inner.list_encryption_configs(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_encryption_config(
        &self,
        req: crate::model::GetEncryptionConfigRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::EncryptionConfig>> {
        self.inner.get_encryption_config(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_locations(
        &self,
        req: location::model::ListLocationsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<location::model::ListLocationsResponse>> {
        self.inner.list_locations(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_location(
        &self,
        req: location::model::GetLocationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<location::model::Location>> {
        self.inner.get_location(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn set_iam_policy(
        &self,
        req: iam_v1::model::SetIamPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::Policy>> {
        self.inner.set_iam_policy(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_iam_policy(
        &self,
        req: iam_v1::model::GetIamPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::Policy>> {
        self.inner.get_iam_policy(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn test_iam_permissions(
        &self,
        req: iam_v1::model::TestIamPermissionsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::TestIamPermissionsResponse>> {
        self.inner.test_iam_permissions(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_operations(
        &self,
        req: longrunning::model::ListOperationsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::ListOperationsResponse>> {
        self.inner.list_operations(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_operation(
        &self,
        req: longrunning::model::GetOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.get_operation(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_operation(
        &self,
        req: longrunning::model::DeleteOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        self.inner.delete_operation(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn cancel_operation(
        &self,
        req: longrunning::model::CancelOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        self.inner.cancel_operation(req, options).await
    }

    fn get_polling_error_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_error_policy::PollingErrorPolicy> {
        self.inner.get_polling_error_policy(options)
    }

    fn get_polling_backoff_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_backoff_policy::PollingBackoffPolicy> {
        self.inner.get_polling_backoff_policy(options)
    }
}

/// Implements a [ContentService](super::stub::ContentService) decorator for logging and tracing.
#[derive(Clone, Debug)]
pub struct ContentService<T>
where
    T: super::stub::ContentService + std::fmt::Debug + Send + Sync,
{
    inner: T,
}

impl<T> ContentService<T>
where
    T: super::stub::ContentService + std::fmt::Debug + Send + Sync,
{
    pub fn new(inner: T) -> Self {
        Self { inner }
    }
}

impl<T> super::stub::ContentService for ContentService<T>
where
    T: super::stub::ContentService + std::fmt::Debug + Send + Sync,
{
    #[tracing::instrument(ret)]
    async fn create_content(
        &self,
        req: crate::model::CreateContentRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::Content>> {
        self.inner.create_content(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn update_content(
        &self,
        req: crate::model::UpdateContentRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::Content>> {
        self.inner.update_content(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_content(
        &self,
        req: crate::model::DeleteContentRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        self.inner.delete_content(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_content(
        &self,
        req: crate::model::GetContentRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::Content>> {
        self.inner.get_content(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_iam_policy(
        &self,
        req: iam_v1::model::GetIamPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::Policy>> {
        self.inner.get_iam_policy(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn set_iam_policy(
        &self,
        req: iam_v1::model::SetIamPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::Policy>> {
        self.inner.set_iam_policy(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn test_iam_permissions(
        &self,
        req: iam_v1::model::TestIamPermissionsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::TestIamPermissionsResponse>> {
        self.inner.test_iam_permissions(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_content(
        &self,
        req: crate::model::ListContentRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListContentResponse>> {
        self.inner.list_content(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_locations(
        &self,
        req: location::model::ListLocationsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<location::model::ListLocationsResponse>> {
        self.inner.list_locations(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_location(
        &self,
        req: location::model::GetLocationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<location::model::Location>> {
        self.inner.get_location(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_operations(
        &self,
        req: longrunning::model::ListOperationsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::ListOperationsResponse>> {
        self.inner.list_operations(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_operation(
        &self,
        req: longrunning::model::GetOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.get_operation(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_operation(
        &self,
        req: longrunning::model::DeleteOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        self.inner.delete_operation(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn cancel_operation(
        &self,
        req: longrunning::model::CancelOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        self.inner.cancel_operation(req, options).await
    }
}

/// Implements a [DataTaxonomyService](super::stub::DataTaxonomyService) decorator for logging and tracing.
#[derive(Clone, Debug)]
pub struct DataTaxonomyService<T>
where
    T: super::stub::DataTaxonomyService + std::fmt::Debug + Send + Sync,
{
    inner: T,
}

impl<T> DataTaxonomyService<T>
where
    T: super::stub::DataTaxonomyService + std::fmt::Debug + Send + Sync,
{
    pub fn new(inner: T) -> Self {
        Self { inner }
    }
}

impl<T> super::stub::DataTaxonomyService for DataTaxonomyService<T>
where
    T: super::stub::DataTaxonomyService + std::fmt::Debug + Send + Sync,
{
    #[tracing::instrument(ret)]
    async fn create_data_taxonomy(
        &self,
        req: crate::model::CreateDataTaxonomyRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.create_data_taxonomy(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn update_data_taxonomy(
        &self,
        req: crate::model::UpdateDataTaxonomyRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.update_data_taxonomy(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_data_taxonomy(
        &self,
        req: crate::model::DeleteDataTaxonomyRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.delete_data_taxonomy(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_data_taxonomies(
        &self,
        req: crate::model::ListDataTaxonomiesRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListDataTaxonomiesResponse>> {
        self.inner.list_data_taxonomies(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_data_taxonomy(
        &self,
        req: crate::model::GetDataTaxonomyRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::DataTaxonomy>> {
        self.inner.get_data_taxonomy(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn create_data_attribute_binding(
        &self,
        req: crate::model::CreateDataAttributeBindingRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.create_data_attribute_binding(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn update_data_attribute_binding(
        &self,
        req: crate::model::UpdateDataAttributeBindingRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.update_data_attribute_binding(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_data_attribute_binding(
        &self,
        req: crate::model::DeleteDataAttributeBindingRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.delete_data_attribute_binding(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_data_attribute_bindings(
        &self,
        req: crate::model::ListDataAttributeBindingsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListDataAttributeBindingsResponse>> {
        self.inner.list_data_attribute_bindings(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_data_attribute_binding(
        &self,
        req: crate::model::GetDataAttributeBindingRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::DataAttributeBinding>> {
        self.inner.get_data_attribute_binding(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn create_data_attribute(
        &self,
        req: crate::model::CreateDataAttributeRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.create_data_attribute(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn update_data_attribute(
        &self,
        req: crate::model::UpdateDataAttributeRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.update_data_attribute(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_data_attribute(
        &self,
        req: crate::model::DeleteDataAttributeRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.delete_data_attribute(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_data_attributes(
        &self,
        req: crate::model::ListDataAttributesRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListDataAttributesResponse>> {
        self.inner.list_data_attributes(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_data_attribute(
        &self,
        req: crate::model::GetDataAttributeRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::DataAttribute>> {
        self.inner.get_data_attribute(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_locations(
        &self,
        req: location::model::ListLocationsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<location::model::ListLocationsResponse>> {
        self.inner.list_locations(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_location(
        &self,
        req: location::model::GetLocationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<location::model::Location>> {
        self.inner.get_location(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn set_iam_policy(
        &self,
        req: iam_v1::model::SetIamPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::Policy>> {
        self.inner.set_iam_policy(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_iam_policy(
        &self,
        req: iam_v1::model::GetIamPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::Policy>> {
        self.inner.get_iam_policy(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn test_iam_permissions(
        &self,
        req: iam_v1::model::TestIamPermissionsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::TestIamPermissionsResponse>> {
        self.inner.test_iam_permissions(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_operations(
        &self,
        req: longrunning::model::ListOperationsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::ListOperationsResponse>> {
        self.inner.list_operations(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_operation(
        &self,
        req: longrunning::model::GetOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.get_operation(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_operation(
        &self,
        req: longrunning::model::DeleteOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        self.inner.delete_operation(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn cancel_operation(
        &self,
        req: longrunning::model::CancelOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        self.inner.cancel_operation(req, options).await
    }

    fn get_polling_error_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_error_policy::PollingErrorPolicy> {
        self.inner.get_polling_error_policy(options)
    }

    fn get_polling_backoff_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_backoff_policy::PollingBackoffPolicy> {
        self.inner.get_polling_backoff_policy(options)
    }
}

/// Implements a [DataScanService](super::stub::DataScanService) decorator for logging and tracing.
#[derive(Clone, Debug)]
pub struct DataScanService<T>
where
    T: super::stub::DataScanService + std::fmt::Debug + Send + Sync,
{
    inner: T,
}

impl<T> DataScanService<T>
where
    T: super::stub::DataScanService + std::fmt::Debug + Send + Sync,
{
    pub fn new(inner: T) -> Self {
        Self { inner }
    }
}

impl<T> super::stub::DataScanService for DataScanService<T>
where
    T: super::stub::DataScanService + std::fmt::Debug + Send + Sync,
{
    #[tracing::instrument(ret)]
    async fn create_data_scan(
        &self,
        req: crate::model::CreateDataScanRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.create_data_scan(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn update_data_scan(
        &self,
        req: crate::model::UpdateDataScanRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.update_data_scan(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_data_scan(
        &self,
        req: crate::model::DeleteDataScanRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.delete_data_scan(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_data_scan(
        &self,
        req: crate::model::GetDataScanRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::DataScan>> {
        self.inner.get_data_scan(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_data_scans(
        &self,
        req: crate::model::ListDataScansRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListDataScansResponse>> {
        self.inner.list_data_scans(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn run_data_scan(
        &self,
        req: crate::model::RunDataScanRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::RunDataScanResponse>> {
        self.inner.run_data_scan(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_data_scan_job(
        &self,
        req: crate::model::GetDataScanJobRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::DataScanJob>> {
        self.inner.get_data_scan_job(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_data_scan_jobs(
        &self,
        req: crate::model::ListDataScanJobsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListDataScanJobsResponse>> {
        self.inner.list_data_scan_jobs(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn generate_data_quality_rules(
        &self,
        req: crate::model::GenerateDataQualityRulesRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::GenerateDataQualityRulesResponse>> {
        self.inner.generate_data_quality_rules(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_locations(
        &self,
        req: location::model::ListLocationsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<location::model::ListLocationsResponse>> {
        self.inner.list_locations(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_location(
        &self,
        req: location::model::GetLocationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<location::model::Location>> {
        self.inner.get_location(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn set_iam_policy(
        &self,
        req: iam_v1::model::SetIamPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::Policy>> {
        self.inner.set_iam_policy(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_iam_policy(
        &self,
        req: iam_v1::model::GetIamPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::Policy>> {
        self.inner.get_iam_policy(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn test_iam_permissions(
        &self,
        req: iam_v1::model::TestIamPermissionsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::TestIamPermissionsResponse>> {
        self.inner.test_iam_permissions(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_operations(
        &self,
        req: longrunning::model::ListOperationsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::ListOperationsResponse>> {
        self.inner.list_operations(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_operation(
        &self,
        req: longrunning::model::GetOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.get_operation(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_operation(
        &self,
        req: longrunning::model::DeleteOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        self.inner.delete_operation(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn cancel_operation(
        &self,
        req: longrunning::model::CancelOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        self.inner.cancel_operation(req, options).await
    }

    fn get_polling_error_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_error_policy::PollingErrorPolicy> {
        self.inner.get_polling_error_policy(options)
    }

    fn get_polling_backoff_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_backoff_policy::PollingBackoffPolicy> {
        self.inner.get_polling_backoff_policy(options)
    }
}

/// Implements a [MetadataService](super::stub::MetadataService) decorator for logging and tracing.
#[derive(Clone, Debug)]
pub struct MetadataService<T>
where
    T: super::stub::MetadataService + std::fmt::Debug + Send + Sync,
{
    inner: T,
}

impl<T> MetadataService<T>
where
    T: super::stub::MetadataService + std::fmt::Debug + Send + Sync,
{
    pub fn new(inner: T) -> Self {
        Self { inner }
    }
}

impl<T> super::stub::MetadataService for MetadataService<T>
where
    T: super::stub::MetadataService + std::fmt::Debug + Send + Sync,
{
    #[tracing::instrument(ret)]
    async fn create_entity(
        &self,
        req: crate::model::CreateEntityRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::Entity>> {
        self.inner.create_entity(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn update_entity(
        &self,
        req: crate::model::UpdateEntityRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::Entity>> {
        self.inner.update_entity(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_entity(
        &self,
        req: crate::model::DeleteEntityRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        self.inner.delete_entity(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_entity(
        &self,
        req: crate::model::GetEntityRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::Entity>> {
        self.inner.get_entity(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_entities(
        &self,
        req: crate::model::ListEntitiesRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListEntitiesResponse>> {
        self.inner.list_entities(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn create_partition(
        &self,
        req: crate::model::CreatePartitionRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::Partition>> {
        self.inner.create_partition(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_partition(
        &self,
        req: crate::model::DeletePartitionRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        self.inner.delete_partition(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_partition(
        &self,
        req: crate::model::GetPartitionRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::Partition>> {
        self.inner.get_partition(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_partitions(
        &self,
        req: crate::model::ListPartitionsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListPartitionsResponse>> {
        self.inner.list_partitions(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_locations(
        &self,
        req: location::model::ListLocationsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<location::model::ListLocationsResponse>> {
        self.inner.list_locations(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_location(
        &self,
        req: location::model::GetLocationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<location::model::Location>> {
        self.inner.get_location(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn set_iam_policy(
        &self,
        req: iam_v1::model::SetIamPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::Policy>> {
        self.inner.set_iam_policy(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_iam_policy(
        &self,
        req: iam_v1::model::GetIamPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::Policy>> {
        self.inner.get_iam_policy(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn test_iam_permissions(
        &self,
        req: iam_v1::model::TestIamPermissionsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::TestIamPermissionsResponse>> {
        self.inner.test_iam_permissions(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_operations(
        &self,
        req: longrunning::model::ListOperationsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::ListOperationsResponse>> {
        self.inner.list_operations(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_operation(
        &self,
        req: longrunning::model::GetOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.get_operation(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_operation(
        &self,
        req: longrunning::model::DeleteOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        self.inner.delete_operation(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn cancel_operation(
        &self,
        req: longrunning::model::CancelOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        self.inner.cancel_operation(req, options).await
    }
}

/// Implements a [DataplexService](super::stub::DataplexService) decorator for logging and tracing.
#[derive(Clone, Debug)]
pub struct DataplexService<T>
where
    T: super::stub::DataplexService + std::fmt::Debug + Send + Sync,
{
    inner: T,
}

impl<T> DataplexService<T>
where
    T: super::stub::DataplexService + std::fmt::Debug + Send + Sync,
{
    pub fn new(inner: T) -> Self {
        Self { inner }
    }
}

impl<T> super::stub::DataplexService for DataplexService<T>
where
    T: super::stub::DataplexService + std::fmt::Debug + Send + Sync,
{
    #[tracing::instrument(ret)]
    async fn create_lake(
        &self,
        req: crate::model::CreateLakeRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.create_lake(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn update_lake(
        &self,
        req: crate::model::UpdateLakeRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.update_lake(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_lake(
        &self,
        req: crate::model::DeleteLakeRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.delete_lake(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_lakes(
        &self,
        req: crate::model::ListLakesRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListLakesResponse>> {
        self.inner.list_lakes(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_lake(
        &self,
        req: crate::model::GetLakeRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::Lake>> {
        self.inner.get_lake(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_lake_actions(
        &self,
        req: crate::model::ListLakeActionsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListActionsResponse>> {
        self.inner.list_lake_actions(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn create_zone(
        &self,
        req: crate::model::CreateZoneRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.create_zone(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn update_zone(
        &self,
        req: crate::model::UpdateZoneRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.update_zone(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_zone(
        &self,
        req: crate::model::DeleteZoneRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.delete_zone(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_zones(
        &self,
        req: crate::model::ListZonesRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListZonesResponse>> {
        self.inner.list_zones(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_zone(
        &self,
        req: crate::model::GetZoneRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::Zone>> {
        self.inner.get_zone(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_zone_actions(
        &self,
        req: crate::model::ListZoneActionsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListActionsResponse>> {
        self.inner.list_zone_actions(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn create_asset(
        &self,
        req: crate::model::CreateAssetRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.create_asset(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn update_asset(
        &self,
        req: crate::model::UpdateAssetRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.update_asset(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_asset(
        &self,
        req: crate::model::DeleteAssetRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.delete_asset(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_assets(
        &self,
        req: crate::model::ListAssetsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListAssetsResponse>> {
        self.inner.list_assets(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_asset(
        &self,
        req: crate::model::GetAssetRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::Asset>> {
        self.inner.get_asset(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_asset_actions(
        &self,
        req: crate::model::ListAssetActionsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListActionsResponse>> {
        self.inner.list_asset_actions(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn create_task(
        &self,
        req: crate::model::CreateTaskRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.create_task(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn update_task(
        &self,
        req: crate::model::UpdateTaskRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.update_task(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_task(
        &self,
        req: crate::model::DeleteTaskRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.delete_task(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_tasks(
        &self,
        req: crate::model::ListTasksRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListTasksResponse>> {
        self.inner.list_tasks(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_task(
        &self,
        req: crate::model::GetTaskRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::Task>> {
        self.inner.get_task(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_jobs(
        &self,
        req: crate::model::ListJobsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListJobsResponse>> {
        self.inner.list_jobs(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn run_task(
        &self,
        req: crate::model::RunTaskRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::RunTaskResponse>> {
        self.inner.run_task(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_job(
        &self,
        req: crate::model::GetJobRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::Job>> {
        self.inner.get_job(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn cancel_job(
        &self,
        req: crate::model::CancelJobRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        self.inner.cancel_job(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn create_environment(
        &self,
        req: crate::model::CreateEnvironmentRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.create_environment(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn update_environment(
        &self,
        req: crate::model::UpdateEnvironmentRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.update_environment(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_environment(
        &self,
        req: crate::model::DeleteEnvironmentRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.delete_environment(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_environments(
        &self,
        req: crate::model::ListEnvironmentsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListEnvironmentsResponse>> {
        self.inner.list_environments(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_environment(
        &self,
        req: crate::model::GetEnvironmentRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::Environment>> {
        self.inner.get_environment(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_sessions(
        &self,
        req: crate::model::ListSessionsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListSessionsResponse>> {
        self.inner.list_sessions(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_locations(
        &self,
        req: location::model::ListLocationsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<location::model::ListLocationsResponse>> {
        self.inner.list_locations(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_location(
        &self,
        req: location::model::GetLocationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<location::model::Location>> {
        self.inner.get_location(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn set_iam_policy(
        &self,
        req: iam_v1::model::SetIamPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::Policy>> {
        self.inner.set_iam_policy(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_iam_policy(
        &self,
        req: iam_v1::model::GetIamPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::Policy>> {
        self.inner.get_iam_policy(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn test_iam_permissions(
        &self,
        req: iam_v1::model::TestIamPermissionsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<iam_v1::model::TestIamPermissionsResponse>> {
        self.inner.test_iam_permissions(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_operations(
        &self,
        req: longrunning::model::ListOperationsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::ListOperationsResponse>> {
        self.inner.list_operations(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_operation(
        &self,
        req: longrunning::model::GetOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.get_operation(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_operation(
        &self,
        req: longrunning::model::DeleteOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        self.inner.delete_operation(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn cancel_operation(
        &self,
        req: longrunning::model::CancelOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        self.inner.cancel_operation(req, options).await
    }

    fn get_polling_error_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_error_policy::PollingErrorPolicy> {
        self.inner.get_polling_error_policy(options)
    }

    fn get_polling_backoff_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_backoff_policy::PollingBackoffPolicy> {
        self.inner.get_polling_backoff_policy(options)
    }
}
